package com.mybase.core;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;

public class MyHttpRequest {
	public String get(String url) throws IOException {
		String line, result = null;
		URL uri = new URL(url);
		BufferedReader rd;
		URLConnection conn = uri.openConnection();
		InputStream is = conn.getInputStream();
		rd = new BufferedReader(new InputStreamReader(is));
		while ((line = rd.readLine()) != null) {
			result += line;
		}
		rd.close();
		return result;
	}
}
